package com.leoman.indexapi.service;

import com.leoman.exception.*;
import com.leoman.user.entity.UserInfo;
import com.leoman.user.entity.UserLogin;

import java.util.Map;

/**
 * Created by Administrator on 2016/6/12.
 */
public interface LoginServiceApi {

    Boolean loginCheck(UserLogin userLogin, String password) throws UsernamePasswordException, UserNotFindException;

    UserInfo login(String username, String password, String registrationId) throws UsernamePasswordException, UserNotFindException, UserStatusErrorException;

    UserInfo loginPlus(String openId, Integer type, String avater, Integer gender, String registrationId) throws ParamsErrorException, UserStatusErrorException, ThirdExistException;

    UserInfo loginPlus(String openId, Integer type, String avater, Integer gender, String registrationId, String mobile, String code, String password, String nickname) throws ParamsErrorException, UserStatusErrorException, ThirdExistException, SensitiveWordExistException, UserNicknameExistException;

    // 用户签到
    Integer signIn(Long userId) throws UserNotFindException, UserSignErrorException, UserStatusErrorException;

    // 手动添加主创动态
    void addCreatorDynamic(Long userId);

    Map<String, Object> checkLoginPlusInfo(String openId, Integer type);
}
